<template>
  <div>
    <scroll class="scroll123">
      <grid-view :cols="3" :lineSpace="15" :v-margin="20" v-if="subcategories.list">
        <div class="item" v-for="(item, index) in subcategories.list" :key="index">
          <a :href="item.link">
            <img class="item-img" :src="item.image" alt="">
            <div class="item-text">{{item.title}}</div>
          </a>
        </div>
      </grid-view>
    </scroll>
  </div>
</template>

<script>
  import GridView from "components/common/gridView/GridView";
  import Scroll from "components/common/scroll/Scroll";

  export default {
    name: "TabContentCategory",
    props:{
      subcategories: {
        type: Object,
        default() {
          return []
        }
      }
    },
    components: {
      GridView,
      Scroll
    }
  }
</script>

<style scoped>
  .scroll123{
    position: static;
    height: calc(100vh - 49px);
  }
  .item {
    text-align: center;
    font-size: 12px;
  }
  .item-img {
    width: 80%;
  }
  .item-text {
    margin-top: 15px;
  }
</style>